CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(SERVER)

SET(CMAKE_CXX_STANDARD_REQUIRED ON)
SET(CMAKE_CXX_STANDARD 11)
ADD_COMPILE_OPTIONS(-std=c++11)

INCLUDE_DIRECTORIES("./server")
INCLUDE_DIRECTORIES("./socket")
INCLUDE_DIRECTORIES("./task")
INCLUDE_DIRECTORIES("./thread")
INCLUDE_DIRECTORIES("./utility")
INCLUDE_DIRECTORIES("./xml")
INCLUDE_DIRECTORIES("./engine")

AUX_SOURCE_DIRECTORY(./ MAIN_SRC)

ADD_SUBDIRECTORY(server)
ADD_SUBDIRECTORY(socket)
ADD_SUBDIRECTORY(task)
ADD_SUBDIRECTORY(thread)
ADD_SUBDIRECTORY(utility)
ADD_SUBDIRECTORY(xml)
ADD_SUBDIRECTORY(engine)

ADD_EXECUTABLE(main ${MAIN_SRC})

TARGET_LINK_LIBRARIES(main pthread)
TARGET_LINK_LIBRARIES(main dl)
TARGET_LINK_LIBRARIES(main xml)
TARGET_LINK_LIBRARIES(main utility)
TARGET_LINK_LIBRARIES(main server)
TARGET_LINK_LIBRARIES(main socket)
TARGET_LINK_LIBRARIES(main task)
TARGET_LINK_LIBRARIES(main thread)
TARGET_LINK_LIBRARIES(main engine)

